{% if admin.isGranted('EDIT', object) and admin.hasRoute('edit') %}
    <a href="{{ admin.generateObjectUrl('edit', object) }}" class="btn edit_link" title="{{ 'action_edit'|trans({}, 'SonataAdminBundle') }}">
        <i class="icon-edit"></i>
        {{ 'action_edit'|trans({}, 'SonataAdminBundle') }}
    </a>
{% endif %}
